The present invention relates to an image processing apparatus, and more particularly to an image processor used in a-game computer system.
In a conventional game computer, an image processing operation is carried out mainly by an external memory, a CPU (central processing unit), a VRAM (video RAM), a VDC (video display controller), a VDE (video encoder) and a CRT. In this type of computer, image data are transmitted from the external memory to the VRAM, and are read from the VRAM by the CPU.
In one type of conventional game computer, each image is composed of background and sprite pictures, the background picture being formed in accordance with a character pattern defined by a raster of the CRT and character pitch. In the memory (RAM), the background and sprite images are managed by using background and sprite attribute tables BAT and SATB and character and sprite generators CG and SG, respectively.
The BAT is composed of a "CG color" of 4 bits and a "character code" of 12 bits, to specify positions and colors of the characters to be displayed. The CG is incorporated in the RAM for storing four actual character patterns corresponding to CG codes in the BAT. Each character pattern is defined by 8.times.8 dots and 16 colors. The SATB is composed of a "sprite color" and a "pattern code," the pattern code specifying a corresponding SG. The SG defines an actual sprite pattern.
In such a game computer, an address of the raster position to be displayed is generated first, and then the character code and CG color are given in accordance with the address. An address of the CG is produced in accordance with the character code. The pattern data stored in the CG are read out in accordance with the CG address, and are transmitted with the CG color code to the following stage. The sprite pattern codes and SG color codes are read from the SATB in the order of the address. An address of the SG is produced in accordance with the sprite pattern code as well as the background image. When coordinate data specifying a display position or whole data of the SATB are changed, an image to be displayed on the CRT varies.
When the sprite and background image data are supplied to a priority circuit, these data are superimposed on each other in accordance with an instruction held in a priority register.
When display data including the CG pattern data, CG color code, SG pattern data and SG color code are supplied from the VDC to the VDE, the display data are converted to the RGB signal by a D/A converter in accordance with the contents of a color pallet RAM. The color pallet RAM stores RGB digital data written by the CPU.
FIG. 1 shows the structure of the color pallet RAM, which includes color pallets of "256 addresses.times.9 bits," and is divided into 16 blocks of "16 addresses.times.9 bits." The RGB data are stored in the 9 bit area. That is, each color of the RGB has data of 3 bits, and one dot is defined by one address. Each block has 16 colors selected from 256 colors. In the color pallet RAM, one of the color blocks is specified by the color code to selected 16 colors to be used from 256 colors, and a color to be used is specified from the 16 colors by the pattern data.
In the conventional game computer system, the background and sprite pictures are produced with the same dot cycle in the same unit so that they have the same format. Such background and sprite image data are transmitted to the priority circuit in synchronization with dot clocks, which are used for displaying the images on the CRT. If a variety of image data generators are used, however, the transmission timing must be changed depending on the image data, because many kinds of image data which need different processing times are supplied to the priority circuit.
Recently, a variety of kinds of image data have been required to be displayed in a multi media computer system. According to the conventional system, however, only colored image data are treated, that is, transparent image data are not treated.
In the conventional system, in order to realize fade-in and fade-out processing, generally, the next picture is faded in the CRT after the previous picture has been faded out from the CRT. Further, in order to realize cross fade processing, in which the previous picture is faded out from the CRT by fading the next picture in the CRT, the two pictures are controlled in brightness gradually (in analog fashion) by using an attenuator or the like.
The conventional computer system performs cellophane processing, in which upper and lower pictures (front and back cellophane) are synthesized by an arithmetic operation in accordance with predetermined priority information.
Cellophane arithmetic results Y, U and V are given by the following equations, where Ya, Ua and Va indicate data of a picture to be synthesized on Yb, Ub and Vb data, the Yb, Ub and Vb indicate data of a picture to be synthesized with the Ya, Ua and Va and my, mu, mv, nuy, nv and nu indicate cellophane coefficients, respectively: EQU Y=my.times.Ya+ny.times.Yb EQU U=mu.times.(Ua-80h)+nu.times.(Ub-80h)+80h EQU V=mv.times.(Va-80h)+nv.times.(Vb-80h)+80h
In the above equations, "80h" of the U and V are treated as "0". Each of the Y, U and V becomes "FFh" and "00h" if it is overflown and underflown, respectively.
According to the conventional computer system, however, the cellophane function is not performed for each sprite character.